package com.ruoyi.system.service.city.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.city.CityNoticeMapper;
import com.ruoyi.system.domain.city.CityNotice;
import com.ruoyi.system.service.city.ICityNoticeService;

/**
 * 滚动通知Service业务层处理
 * 
 * @author cjq
 * @date 2023-07-29
 */
@Service
public class CityNoticeServiceImpl implements ICityNoticeService 
{
    @Autowired
    private CityNoticeMapper cityNoticeMapper;

    /**
     * 查询滚动通知
     * 
     * @param noticeId 滚动通知主键
     * @return 滚动通知
     */
    @Override
    public CityNotice selectCityNoticeByNoticeId(Long noticeId)
    {
        return cityNoticeMapper.selectCityNoticeByNoticeId(noticeId);
    }

    /**
     * 查询滚动通知列表
     * 
     * @param cityNotice 滚动通知
     * @return 滚动通知
     */
    @Override
    public List<CityNotice> selectCityNoticeList(CityNotice cityNotice)
    {
        return cityNoticeMapper.selectCityNoticeList(cityNotice);
    }

    /**
     * 新增滚动通知
     * 
     * @param cityNotice 滚动通知
     * @return 结果
     */
    @Override
    public int insertCityNotice(CityNotice cityNotice)
    {
        cityNotice.setCreateTime(DateUtils.getNowDate());
        return cityNoticeMapper.insertCityNotice(cityNotice);
    }

    /**
     * 修改滚动通知
     * 
     * @param cityNotice 滚动通知
     * @return 结果
     */
    @Override
    public int updateCityNotice(CityNotice cityNotice)
    {
        return cityNoticeMapper.updateCityNotice(cityNotice);
    }

    /**
     * 批量删除滚动通知
     * 
     * @param noticeIds 需要删除的滚动通知主键
     * @return 结果
     */
    @Override
    public int deleteCityNoticeByNoticeIds(Long[] noticeIds)
    {
        return cityNoticeMapper.deleteCityNoticeByNoticeIds(noticeIds);
    }

    /**
     * 删除滚动通知信息
     * 
     * @param noticeId 滚动通知主键
     * @return 结果
     */
    @Override
    public int deleteCityNoticeByNoticeId(Long noticeId)
    {
        return cityNoticeMapper.deleteCityNoticeByNoticeId(noticeId);
    }
}
